package com.example.ex2;


import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.core.env.Environment;
import org.springframework.boot.CommandLineRunner;
import org.springframework.context.annotation.Bean;

@EnableConfigurationProperties(Properties.class)
public class Configure {
    @Bean
    @ConditionalOnProperty(prefix = "ccc.auto",name = "enable",havingValue = "true")
    CommandLineRunner createCustomCommandLinerRunner(Environment env)
    {
        return new CommandLineRunnerTest(env);
    }
}
